package com.demo.mykotlin.bean

import android.view.View
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import com.demo.mykotlin.R

/**
 * 密封类
 * 使用 sealed class来修饰
 * @author wen66to88@163.com
 * @date 2020/5/25 - 17:25
 */
sealed class MsgViewHolder(view: View) : RecyclerView.ViewHolder(view)

class LeftViewHolder(view: View) : MsgViewHolder(view) {
    val leftMsg: TextView = view.findViewById(R.id.textView2)
}

class RightViewHolder(view: View) : MsgViewHolder(view) {
    val rightMsg: TextView = view.findViewById(R.id.textView3)
}